package com.homework.dianqi;

import java.util.ArrayList;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/4/3 21:26
 * @description
 */
public class DataProvider {
    public static ArrayList<User> userList = new ArrayList<User>();// 保存用户列表的数据源
    public static ArrayList<Product> proList = new ArrayList<Product>();// 保存商品列表
    public static ArrayList<Product> carList = new ArrayList<Product>();// 保存购物车商品列
    public static User currentUser=null;
    public static void initData() {
        proList.add(new Product("10101", "海尔冰箱", 3999.9, 50));
        proList.add(new Product("10102", "格力冰箱", 2888.8, 30));
        proList.add(new Product("10103", "TCL冰箱", 1999.8, 100));
        proList.add(new Product("10104", "美的冰箱", 4999.9, 60));
        proList.add(new Product("10201", "海尔空调", 3099.9, 50));
        proList.add(new Product("10202", "格力空调", 2808.8, 40));
        proList.add(new Product("10203", "TCL空调", 1099.8, 120));
        proList.add(new Product("10204", "美的空调", 4909.9, 65));
        userList.add(new User("admin", "123456", "张三", 24));
    }
}
